<template>
  <RouterView v-if="ready" />
  <Skeleton v-else />
</template>

<script setup lang="ts">
import { RouterView } from 'vue-router'
import { useCmConfigStore } from '@monorepo/core/store/baseStore'
import { storeToRefs } from 'pinia'
import Skeleton from './views/skeleton/SkeletonView.vue'
import BeanCmConfigRequest from '@monorepo/core/bean/cmConfig/BeanCmConfigRequest'

const cmConfigStore = useCmConfigStore()
const { fetchCmConfigList } = cmConfigStore
const { ready } = storeToRefs(cmConfigStore)

// 初始化数据必调用
const beanCmConfigRequest = new BeanCmConfigRequest('hg')
fetchCmConfigList(beanCmConfigRequest)
</script>
<style scoped lang="ts"></style>
